package cn.source.system.domain;

import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import cn.source.common.annotation.Excel;
import cn.source.common.core.domain.BaseEntity;

/**
 * 数据备份记录对象 db_record
 *
 * @author sourcebyte.vip
 * @date 2025-02-21
 */
public class DbRecord {
    private static final long serialVersionUID = 1L;

    /**
     * 连接名称
     */
    @Excel(name = "连接名称")
    private String connName;

    /**
     * 开始时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Excel(name = "开始时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date startTime;

    /**
     * 结束时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Excel(name = "结束时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date endTime;

    /**
     * 主键
     */
    @Excel(name = "主键")
    private Long id;

    /**
     * 状态 success fail
     */
    @Excel(name = "状态 success fail")
    private String status;

    /**
     * 错误消息
     */
    @Excel(name = "错误消息")
    private String errMsg;

    @Excel(name = "备份表对应文件的映射")
    private String tablesToFile;

    private String taskName;

    public String getTaskName() {
        return taskName;
    }

    public void setTaskName(String taskName) {
        this.taskName = taskName;
    }

    public String getTablesToFile() {
        return tablesToFile;
    }

    public void setTablesToFile(String tablesToFile) {
        this.tablesToFile = tablesToFile;
    }

    public void setConnName(String connName) {
        this.connName = connName;
    }

    public String getConnName() {
        return connName;
    }

    public void setStartTime(Date startTime) {
        this.startTime = startTime;
    }

    public Date getStartTime() {
        return startTime;
    }

    public void setEndTime(Date endTime) {
        this.endTime = endTime;
    }

    public Date getEndTime() {
        return endTime;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public Long getId() 
    {
        return id;
    }
    public void setStatus(String status) 
    {
        this.status = status;
    }

    public String getStatus() 
    {
        return status;
    }
    public void setErrMsg(String errMsg) 
    {
        this.errMsg = errMsg;
    }

    public String getErrMsg() 
    {
        return errMsg;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("connName", getConnName())
            .append("startTime", getStartTime())
            .append("endTime", getEndTime())
            .append("id", getId())
            .append("status", getStatus())
            .append("errMsg", getErrMsg())
            .toString();
    }
}
